```
public class Student {
    // 属性
    private String name;
    private String studentId;
    private String major;
    private String className;

    // 构造函数
    public Student(String name, String studentId, String major, String className) {
        this.name = name;
        this.studentId = studentId;
        this.major = major;
        this.className = className;
    }

    // Getter 和 Setter 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    // 打印学生信息的方法
    public void printStudentInfo() {
        System.out.println(学生姓名:  + name);
        System.out.println(学号:  + studentId);
        System.out.println(专业:  + major);
        System.out.println(班级:  + className);
    }

    // 主方法，用于创建学生对象并打印信息
    public static void main(String[] args) {
        // 创建一个学生对象
        Student student = new Student(熊国彬, 2330210808, 计算机科学与技术, 21计科本8);

        // 打印学生信息
        student.printStudentInfo();
    }
}

```
